package day10;
import java.util.Scanner;
public class learn8 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //定义次数的变量和初始值
            int count=0;
        System.out.println("请输入任意一个字符串:");
        //控制台输入字符串
        String th = sc.next();
        System.out.println("请输入你要查找的字符:");
        //查找的字符串
        String num = sc.next();
        //循环控制查找的字符串长度
        for (int i = 0; i < th.length(); i++) {
           if(th.substring(i,i+1).indexOf(num)!=(-1)){
               count++;
           }
        }
        System.out.println(count);
    }
    }
